package com.asia5b.a5mall.middleware.utils.glide

import android.content.Context
import com.asia5b.a5mall.middleware.utils.WImageLoader
import com.youth.banner.Banner
import com.youth.banner.adapter.BannerImageAdapter
import com.youth.banner.holder.BannerImageHolder
import com.youth.banner.indicator.CircleIndicator

/**
 * Created by zhangyuncai on 2020/8/17.
 */
class BannerImageImlAdapter<T : BannerImageInteface>(list: MutableList<T>) : BannerImageAdapter<T>(list) {

    override fun onBindView(holder: BannerImageHolder, data: T, position: Int, size: Int) {
        if (data != null) {
            val imgUrl = data.showImageUrl()
            WImageLoader.displayImage(imgUrl, holder.imageView)
        }
    }
}